package monopoli.gui;

import javax.swing.JLabel;


public class Pedina {
    private String nome;
    private int casella;
    private int posX;

    public int getCasella() {
        return casella;
    }

    public void setCasella(int casella) {
        this.casella = casella;
    }
    private int posY;
    private JLabel lbl;

    public JLabel getLbl() {
        return lbl;
    }

    public void setLbl(JLabel lbl) {
        this.lbl = lbl;
    }
 

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public int getPosX() {
        return posX;
    }

    public void setPosX(int posX) {
        this.posX = posX;
    }

    public int getPosY() {
        return posY;
    }

    public void setPosY(int posY) {
        this.posY = posY;
    }
    

    public Pedina () {
        lbl = new JLabel();
    }

    public static int nameToId(String name) {

        int iPedina = 0;

        if (name.compareTo("funghetto") == 0) {
            iPedina = 1;
        }
          if (name.compareTo("candela") == 0) {
            iPedina = 2;
        }
         if (name.compareTo("piantina") == 0) {
            iPedina = 3;
        }
          if (name.compareTo("pera") == 0) {
            iPedina = 4;
        }
          if (name.compareTo("mela") == 0) {
            iPedina = 5;
        }
          if (name.compareTo("fiasco") == 0) {
            iPedina = 6;
        }

        return iPedina;
    }

    public static String idToName(int id) {


        String name = "";

        if (id == 1) {
            name = "funghetto";
        }
        if (id == 2) {
            name = "candela";
        }
        if (id == 3) {
            name = "piantina";
        }
        if (id == 4) {
            name = "pera";
        }
        if (id == 5) {
            name = "mela";
        }
        if (id == 6) {
            name = "fiasco";
        }

        return name;



    }
}

